<?php

namespace app\admin\model;

use app\admin\traits\ScopeUniacid;
use app\common\model\TimeModel;

class KnscyTicketOut extends TimeModel
{

    protected $name = "ticket_out";
    protected $globalScope = ['uniacid'];
    use ScopeUniacid;

    protected $deleteTime = "delete_time";

    
    
    public function getIsEndList()
    {
        return ['0'=>'待用','1'=>'用完',];
    }

    public function getStatusList()
    {
        return ['0'=>'禁用','1'=>'启用',];
    }

    public function getPeopleInfoAttr($value, $data)
    {
        return json_decode($value, true);
    }

    public function orderInfo()
    {
        return $this->hasOne( KnscyOrders::class, 'order_no', 'order_no');
    }


}